﻿using System;
using System.ComponentModel;

namespace PersonaLibrary.Data
{
    public interface IDBEntity
    {
        int Id { get; }
    }

    public abstract class BaseEntity : IDBEntity
    {
        public abstract int Id { set; get; }

        public abstract DateTime? UpdateDate { set; get; }

        public abstract string UserName { set; get; }

#pragma warning disable 67
        public event PropertyChangingEventHandler PropertyChanging;
#pragma warning restore 67

#pragma warning disable 67
        public event PropertyChangedEventHandler PropertyChanged;
#pragma warning restore 67

        public virtual void Detach()
        {
            PropertyChanged = null;
            PropertyChanging = null;
        }

		public virtual void LoadPartialFields()
		{
			
		}
    }
}
